Skip to content

Conversation

kyubifire
Copy link
Contributor

2 new commands:

slcli block volume-count
slcli file volume-count

improved display of information in block and file volume-list

Nilo Lisboa and others added 9 commits March 6, 2017 17:11
Implemented replica-locations and replica-partners for improved Experience when replicating or looking up information on replicants.
The CLI doc still had some old commands in it, so those have been
removed. There have also been new commands added to slcli that weren't
reflected in the doc.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 82.699% when pulling 817eb85 on kyubifire:master into 043a94a on softlayer:master.

Copy link
Member

@allmightyspiff allmightyspiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically undo your changes to the block/file managers. and just send in the objectMask you need in the CLI command.

Try to get the code coverage up a bit as well if possible.

'activeTransactionCount'
'activeTransactionCount',
'replicationPartnerCount',
',replicationPartners[id,username,'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"," at the start and end of the lines are not needed, as they are added by the join at the botton

]
kwargs['mask'] = ','.join(items)

# Retrieve relevant replicant information to be displayed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These items are already in the mask above. Remove this section.

'serviceResourceBackendIpAddress',
'activeTransactionCount',
'fileNetworkMountAddress'
'fileNetworkMountAddress',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as the block section


file_manager = SoftLayer.FileStorageManager(env.client)
file_volumes = file_manager.list_file_volumes(datacenter=datacenter,
mask=columns.mask())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of modifying the mask in the manager, just do something like this. fix the line width so tox doesn't complain about it too.

    mask = "mask[serviceResource[datacenter[name]],replicationPartners[serviceResource[datacenter[name]]]]"
    block_volumes = block_manager.list_block_volumes(datacenter=datacenter,
                                                     mask=mask)

def cli(env, sortby, columns, datacenter):
"""List number of block storage volumes per datacenter."""
block_manager = SoftLayer.BlockStorageManager(env.client)
block_volumes = block_manager.list_block_volumes(datacenter=datacenter,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as in the file volume-count CLI command

@dpickle2 dpickle2 mentioned this pull request Aug 7, 2017
@dpickle2
Copy link

dpickle2 commented Aug 8, 2017

Work from this pull request is continued in #856.

@dpickle2 dpickle2 closed this Aug 8, 2017
allmightyspiff pushed a commit to allmightyspiff/softlayer-python that referenced this pull request Aug 9, 2017
allmightyspiff pushed a commit to allmightyspiff/softlayer-python that referenced this pull request Aug 9, 2017
allmightyspiff pushed a commit to allmightyspiff/softlayer-python that referenced this pull request Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants